home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1999 January: Mac OS SDK / Dev.CD Jan 99 SDK1.toast / Development Kits / Interfaces&Libraries / Universal / Interfaces / PInterfaces / SpeechRecognition.p < prev    next >
Encoding:
Text File  |  1998-08-17  |  21.6 KB  |  450 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        SpeechRecognition.p
  3.  
  4.      Contains:    Apple Speech Recognition Toolbox Interfaces.
  5.  
  6.      Version:    Technology:    PlainTalk 1.5
  7.                  Release:    Universal Interfaces 3.2
  8.  
  9.      Copyright:    © 1992-1998 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        For bug reports, consult the following page on
  12.                  the World Wide Web:
  13.  
  14.                      http://developer.apple.com/bugreporter/
  15.  
  16. }
  17. {$IFC UNDEFINED UsingIncludes}
  18. {$SETC UsingIncludes := 0}
  19. {$ENDC}
  20.  
  21. {$IFC NOT UsingIncludes}
  22.  UNIT SpeechRecognition;
  23.  INTERFACE
  24. {$ENDC}
  25.  
  26. {$IFC UNDEFINED __SPEECHRECOGNITION__}
  27. {$SETC __SPEECHRECOGNITION__ := 1}
  28.  
  29. {$I+}
  30. {$SETC SpeechRecognitionIncludes := UsingIncludes}
  31. {$SETC UsingIncludes := 1}
  32.  
  33. {$IFC UNDEFINED __MACTYPES__}
  34. {$I MacTypes.p}
  35. {$ENDC}
  36. {$IFC UNDEFINED __MIXEDMODE__}
  37. {$I MixedMode.p}
  38. {$ENDC}
  39.  
  40.  
  41. {$PUSH}
  42. {$ALIGN MAC68K}
  43. {$LibExport+}
  44.  
  45. { Error Codes [Speech recognition gets -5100 through -5199] }
  46.  
  47. CONST
  48.     kSRNotAvailable                = -5100;                        {  the service requested is not avail or applicable  }
  49.     kSRInternalError            = -5101;                        {  a system internal or hardware error condition  }
  50.     kSRComponentNotFound        = -5102;                        {  a needed system resource was not located  }
  51.     kSROutOfMemory                = -5103;                        {  an out of memory error occurred in the toolbox memory space  }
  52.     kSRNotASpeechObject            = -5104;                        {  the object specified is no longer or never was valid  }
  53.     kSRBadParameter                = -5105;                        {  an invalid parameter was specified  }
  54.     kSRParamOutOfRange            = -5106;                        {  when we say 0-100, don't pass in 101.  }
  55.     kSRBadSelector                = -5107;                        {  an unrecognized selector was specified  }
  56.     kSRBufferTooSmall            = -5108;                        {  returned from attribute access functions  }
  57.     kSRNotARecSystem            = -5109;                        {  the object used was not a SRRecognitionSystem  }
  58.     kSRFeedbackNotAvail            = -5110;                        {  there is no feedback window associated with SRRecognizer  }
  59.     kSRCantSetProperty            = -5111;                        {  a non-settable property was specified  }
  60.     kSRCantGetProperty            = -5112;                        {  a non-gettable property was specified  }
  61.     kSRCantSetDuringRecognition    = -5113;                        {  the property can't be set while recognition is in progress -- do before or between utterances.  }
  62.     kSRAlreadyListening            = -5114;                        {  in response to SRStartListening  }
  63.     kSRNotListeningState        = -5115;                        {  in response to SRStopListening  }
  64.     kSRModelMismatch            = -5116;                        {  no acoustical models are avail to match request  }
  65.     kSRNoClientLanguageModel    = -5117;                        {  trying to access a non-specified SRLanguageModel  }
  66.     kSRNoPendingUtterances        = -5118;                        {  nothing to continue search on  }
  67.     kSRRecognitionCanceled        = -5119;                        {  an abort error occurred during search  }
  68.     kSRRecognitionDone            = -5120;                        {  search has finished, but nothing was recognized  }
  69.     kSROtherRecAlreadyModal        = -5121;                        {  another recognizer is modal at the moment, so can't set this recognizer's kSRBlockModally property right now  }
  70.     kSRHasNoSubItems            = -5122;                        {  SRCountItems or related routine was called on an object without subelements -- e.g. a word -- rather than phrase, path, or LM.  }
  71.     kSRSubItemNotFound            = -5123;                        {  returned when accessing a non-existent sub item of a container  }
  72.     kSRLanguageModelTooBig        = -5124;                        {  Cant build language models so big  }
  73.     kSRAlreadyReleased            = -5125;                        {  this object has already been released before  }
  74.     kSRAlreadyFinished            = -5126;                        {  the language model can't be finished twice  }
  75.     kSRWordNotFound                = -5127;                        {  the spelling couldn't be found in lookup(s)  }
  76.     kSRNotFinishedWithRejection    = -5128;                        {  property not found because the LMObj is not finished with rejection  }
  77.     kSRExpansionTooDeep            = -5129;                        {  Language model is left recursive or is embedded too many levels  }
  78.     kSRTooManyElements            = -5130;                        {  Too many elements added to phrase or path or other langauge model object  }
  79.     kSRCantAdd                    = -5131;                        {  Can't add given type of object to the base SRLanguageObject (e.g.in SRAddLanguageObject)     }
  80.     kSRSndInSourceDisconnected    = -5132;                        {  Sound input source is disconnected  }
  81.     kSRCantReadLanguageObject    = -5133;                        {  An error while trying to create new Language object from file or pointer -- possibly bad format  }
  82.                                                                 {  non-release debugging error codes are included here  }
  83.     kSRNotImplementedYet        = -5199;                        {  you'd better wait for this feature in a future release  }
  84.  
  85.  
  86. { Type Definitions }
  87.  
  88. TYPE
  89.     SRSpeechObject = ^LONGINT;
  90.     SRRecognitionSystem                    = SRSpeechObject;
  91.     SRRecognizer                        = SRSpeechObject;
  92.     SRSpeechSource                        = SRSpeechObject;
  93.     SRRecognitionResult                    = SRSpeechSource;
  94.     SRLanguageObject                    = SRSpeechObject;
  95.     SRLanguageModel                        = SRLanguageObject;
  96.     SRPath                                = SRLanguageObject;
  97.     SRPhrase                            = SRLanguageObject;
  98.     SRWord                                = SRLanguageObject;
  99. { between 0 and 100 }
  100.     SRSpeedSetting                        = UInt16;
  101. { between 0 and 100 }
  102.     SRRejectionLevel                    = UInt16;
  103. { When an event occurs, the user supplied proc will be called with a pointer    }
  104. {    to the param passed in and a flag to indicate conditions such                }
  105. {    as interrupt time or system background time.                                }
  106.     SRCallBackStructPtr = ^SRCallBackStruct;
  107.     SRCallBackStruct = RECORD
  108.         what:                    LONGINT;                                {  one of notification flags  }
  109.         message:                LONGINT;                                {  contains SRRecognitionResult id  }
  110.         instance:                SRRecognizer;                            {  ID of recognizer being notified  }
  111.         status:                    OSErr;                                    {  result status of last search  }
  112.         flags:                    INTEGER;                                {  non-zero if occurs during interrupt  }
  113.         refCon:                    LONGINT;                                {  user defined - set from SRCallBackParam  }
  114.     END;
  115.  
  116. { Call back procedure definition }
  117. {$IFC TYPED_FUNCTION_POINTERS}
  118.     SRCallBackProcPtr = PROCEDURE(VAR param: SRCallBackStruct);
  119. {$ELSEC}
  120.     SRCallBackProcPtr = ProcPtr;
  121. {$ENDC}
  122.  
  123.     SRCallBackUPP = UniversalProcPtr;
  124.  
  125. CONST
  126.     uppSRCallBackProcInfo = $000000C0;
  127.  
  128. FUNCTION NewSRCallBackProc(userRoutine: SRCallBackProcPtr): SRCallBackUPP;
  129.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  130.     INLINE $2E9F;
  131.     {$ENDC}
  132.  
  133. PROCEDURE CallSRCallBackProc(VAR param: SRCallBackStruct; userRoutine: SRCallBackUPP);
  134.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  135.     INLINE $205F, $4E90;
  136.     {$ENDC}
  137.  
  138. TYPE
  139.     SRCallBackParamPtr = ^SRCallBackParam;
  140.     SRCallBackParam = RECORD
  141.         callBack:                SRCallBackUPP;
  142.         refCon:                    LONGINT;
  143.     END;
  144.  
  145. { Recognition System Types }
  146.  
  147. CONST
  148.     kSRDefaultRecognitionSystemID = 0;
  149.  
  150. { Recognition System Properties }
  151.     kSRFeedbackAndListeningModes = 'fbwn';                        {  short: one of kSRNoFeedbackHasListenModes, kSRHasFeedbackHasListenModes, kSRNoFeedbackNoListenModes  }
  152.     kSRRejectedWord                = 'rejq';                        {  the SRWord used to represent a rejection  }
  153.     kSRCleanupOnClientExit        = 'clup';                        {  Boolean: Default is true. The rec system and everything it owns is disposed when the client application quits  }
  154.  
  155.     kSRNoFeedbackNoListenModes    = 0;                            {  next allocated recognizer has no feedback window and doesn't use listening modes     }
  156.     kSRHasFeedbackHasListenModes = 1;                            {  next allocated recognizer has feedback window and uses listening modes              }
  157.     kSRNoFeedbackHasListenModes    = 2;                            {  next allocated recognizer has no feedback window but does use listening modes      }
  158.  
  159. { Speech Source Types }
  160.     kSRDefaultSpeechSource        = 0;
  161.     kSRLiveDesktopSpeechSource    = 'dklv';                        {  live desktop sound input  }
  162.     kSRCanned22kHzSpeechSource    = 'ca22';                        {  AIFF file based 16 bit, 22.050 KHz sound input  }
  163.  
  164. { Notification via Apple Event or Callback }
  165. { Notification Flags }
  166.     kSRNotifyRecognitionBeginning = $00000001;                    {  recognition can begin. client must now call SRContinueRecognition or SRCancelRecognition  }
  167.     kSRNotifyRecognitionDone    = $00000002;                    {  recognition has terminated. result (if any) is available.  }
  168.  
  169. { Apple Event selectors }
  170. { AppleEvent message class  }
  171.     kAESpeechSuite                = 'sprc';
  172.  
  173. { AppleEvent message event ids }
  174.     kAESpeechDone                = 'srsd';
  175.     kAESpeechDetected            = 'srbd';
  176.  
  177. { AppleEvent Parameter ids }
  178.     keySRRecognizer                = 'krec';
  179.     keySRSpeechResult            = 'kspr';
  180.     keySRSpeechStatus            = 'ksst';
  181.  
  182. { AppleEvent Parameter types }
  183.     typeSRRecognizer            = 'trec';
  184.     typeSRSpeechResult            = 'tspr';
  185.  
  186.  
  187. { SRRecognizer Properties }
  188.     kSRNotificationParam        = 'noti';                        {  see notification flags below  }
  189.     kSRCallBackParam            = 'call';                        {  type SRCallBackParam  }
  190.     kSRSearchStatusParam        = 'stat';                        {  see status flags below  }
  191.     kSRAutoFinishingParam        = 'afin';                        {  automatic finishing applied on LM for search  }
  192.     kSRForegroundOnly            = 'fgon';                        {  Boolean. Default is true. If true, client recognizer only active when in foreground.     }
  193.     kSRBlockBackground            = 'blbg';                        {  Boolean. Default is false. If true, when client recognizer in foreground, rest of LMs are inactive.     }
  194.     kSRBlockModally                = 'blmd';                        {  Boolean. Default is false. When true, this client's LM is only active LM; all other LMs are inactive. Be nice, don't be modal for long periods!  }
  195.     kSRWantsResultTextDrawn        = 'txfb';                        {  Boolean. Default is true. If true, search results are posted to Feedback window  }
  196.     kSRWantsAutoFBGestures        = 'dfbr';                        {  Boolean. Default is true. If true, client needn't call SRProcessBegin/End to get default feedback behavior  }
  197.     kSRSoundInVolume            = 'volu';                        {  short in [0..100] log scaled sound input power. Can't set this property  }
  198.     kSRReadAudioFSSpec            = 'aurd';                        {  *FSSpec. Specify FSSpec where raw audio is to be read (AIFF format) using kSRCanned22kHzSpeechSource. Reads until EOF  }
  199.     kSRCancelOnSoundOut            = 'caso';                        {  Boolean: Default is true.  If any sound is played out during utterance, recognition is aborted.  }
  200.     kSRSpeedVsAccuracyParam        = 'sped';                        {  SRSpeedSetting between 0 and 100  }
  201.  
  202. { 0 means more accurate but slower. }
  203. { 100 means (much) less accurate but faster. }
  204.     kSRUseToggleListen            = 0;                            {  listen key modes  }
  205.     kSRUsePushToTalk            = 1;
  206.  
  207.     kSRListenKeyMode            = 'lkmd';                        {  short: either kSRUseToggleListen or kSRUsePushToTalk  }
  208.     kSRListenKeyCombo            = 'lkey';                        {  short: Push-To-Talk key combination; high byte is high byte of event->modifiers, the low byte is the keycode from event->message  }
  209.     kSRListenKeyName            = 'lnam';                        {  Str63: string representing ListenKeyCombo  }
  210.     kSRKeyWord                    = 'kwrd';                        {  Str255: keyword preceding spoken commands in kSRUseToggleListen mode  }
  211.     kSRKeyExpected                = 'kexp';                        {  Boolean: Must the PTT key be depressed or the key word spoken before recognition can occur?  }
  212.  
  213. { Operational Status Flags }
  214.     kSRIdleRecognizer            = $00000001;                    {  engine is not active  }
  215.     kSRSearchInProgress            = $00000002;                    {  search is in progress  }
  216.     kSRSearchWaitForAllClients    = $00000004;                    {  search is suspended waiting on all clients' input  }
  217.     kSRMustCancelSearch            = $00000008;                    {  something has occurred (sound played, non-speech detected) requiring the search to abort  }
  218.     kSRPendingSearch            = $00000010;                    {  we're about to start searching  }
  219.  
  220. { Recognition Result Properties }
  221.     kSRTEXTFormat                = 'TEXT';                        {  raw text in user supplied memory  }
  222.     kSRPhraseFormat                = 'lmph';                        {  SRPhrase containing result words  }
  223.     kSRPathFormat                = 'lmpt';                        {  SRPath containing result phrases or words  }
  224.     kSRLanguageModelFormat        = 'lmfm';                        {  top level SRLanguageModel for post parse  }
  225.  
  226. { SRLanguageObject Family Properties }
  227.     kSRSpelling                    = 'spel';                        {  spelling of a SRWord or SRPhrase or SRPath, or name of a SRLanguageModel  }
  228.     kSRLMObjType                = 'lmtp';                        {  Returns one of SRLanguageObject Types listed below  }
  229.     kSRRefCon                    = 'refc';                        {  4 bytes of user storage  }
  230.     kSROptional                    = 'optl';                        {  Boolean -- true if SRLanguageObject is optional     }
  231.     kSREnabled                    = 'enbl';                        {  Boolean -- true if SRLanguageObject enabled  }
  232.     kSRRepeatable                = 'rptb';                        {  Boolean -- true if SRLanguageObject is repeatable  }
  233.     kSRRejectable                = 'rjbl';                        {  Boolean -- true if SRLanguageObject is rejectable (Recognition System's kSRRejectedWord  }
  234.                                                                 {         object can be returned in place of SRLanguageObject with this property)     }
  235.     kSRRejectionLevel            = 'rjct';                        {  SRRejectionLevel between 0 and 100  }
  236.  
  237. { LM Object Types -- returned as kSRLMObjType property of language model objects }
  238.     kSRLanguageModelType        = 'lmob';                        {  SRLanguageModel  }
  239.     kSRPathType                    = 'path';                        {  SRPath  }
  240.     kSRPhraseType                = 'phra';                        {  SRPhrase  }
  241.     kSRWordType                    = 'word';                        {  SRWord  }
  242.  
  243. { a normal and reasonable rejection level }
  244.     kSRDefaultRejectionLevel    = 50;
  245.  
  246. {******************************************************************************}
  247. {                        NOTES ON USING THE API                                    }
  248. {                                                                                }
  249. {        All operations (with the exception of SRGetRecognitionSystem) are        }
  250. {        directed toward an object allocated or begot from New, Get and Read        }
  251. {        type calls.                                                                }
  252. {                                                                                }
  253. {        There is a simple rule in dealing with allocation and disposal:            }
  254. {                                                                                }
  255. {        *    all toolbox allocations are obtained from a SRRecognitionSystem        }
  256. {                                                                                }
  257. {        *    if you obtain an object via New or Get, then you own a reference     }
  258. {            to that object and it must be released via SRReleaseObject when        }
  259. {            you no longer need it                                                }
  260. {                                                                                }
  261. {        *    when you receive a SRRecognitionResult object via AppleEvent or        }
  262. {            callback, it has essentially been created on your behalf and so        }
  263. {            you are responsible for releasing it as above                        }
  264. {                                                                                }
  265. {        *    when you close a SRRecognitionSystem, all remaining objects which        }
  266. {            were allocated with it will be forcefully released and any            }
  267. {            remaining references to those objects will be invalid.                }
  268. {                                                                                }
  269. {        This translates into a very simple guideline:                            }
  270. {            If you allocate it or have it allocated for you, you must release    }
  271. {            it.  If you are only peeking at it, then don't release it.            }
  272. {                                                                                }
  273. {******************************************************************************}
  274. { Opening and Closing of the SRRecognitionSystem }
  275. FUNCTION SROpenRecognitionSystem(VAR system: SRRecognitionSystem; systemID: OSType): OSErr;
  276.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  277.     INLINE $303C, $0400, $AA56;
  278.     {$ENDC}
  279. FUNCTION SRCloseRecognitionSystem(system: SRRecognitionSystem): OSErr;
  280.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  281.     INLINE $303C, $0201, $AA56;
  282.     {$ENDC}
  283. { Accessing Properties of any Speech Object }
  284. FUNCTION SRSetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; propertyLen: Size): OSErr;
  285.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  286.     INLINE $303C, $0802, $AA56;
  287.     {$ENDC}
  288. FUNCTION SRGetProperty(srObject: SRSpeechObject; selector: OSType; property: UNIV Ptr; VAR propertyLen: Size): OSErr;
  289.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  290.     INLINE $303C, $0803, $AA56;
  291.     {$ENDC}
  292. { Any object obtained via New or Get type calls must be released }
  293. FUNCTION SRReleaseObject(srObject: SRSpeechObject): OSErr;
  294.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  295.     INLINE $303C, $0204, $AA56;
  296.     {$ENDC}
  297. FUNCTION SRGetReference(srObject: SRSpeechObject; VAR newObjectRef: SRSpeechObject): OSErr;
  298.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  299.     INLINE $303C, $0425, $AA56;
  300.     {$ENDC}
  301. { SRRecognizer Instance Functions }
  302. FUNCTION SRNewRecognizer(system: SRRecognitionSystem; VAR recognizer: SRRecognizer; sourceID: OSType): OSErr;
  303.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  304.     INLINE $303C, $060A, $AA56;
  305.     {$ENDC}
  306. FUNCTION SRStartListening(recognizer: SRRecognizer): OSErr;
  307.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  308.     INLINE $303C, $020C, $AA56;
  309.     {$ENDC}
  310. FUNCTION SRStopListening(recognizer: SRRecognizer): OSErr;
  311.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  312.     INLINE $303C, $020D, $AA56;
  313.     {$ENDC}
  314. FUNCTION SRSetLanguageModel(recognizer: SRRecognizer; languageModel: SRLanguageModel): OSErr;
  315.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  316.     INLINE $303C, $040E, $AA56;
  317.     {$ENDC}
  318. FUNCTION SRGetLanguageModel(recognizer: SRRecognizer; VAR languageModel: SRLanguageModel): OSErr;
  319.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  320.     INLINE $303C, $040F, $AA56;
  321.     {$ENDC}
  322. FUNCTION SRContinueRecognition(recognizer: SRRecognizer): OSErr;
  323.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  324.     INLINE $303C, $0210, $AA56;
  325.     {$ENDC}
  326. FUNCTION SRCancelRecognition(recognizer: SRRecognizer): OSErr;
  327.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  328.     INLINE $303C, $0211, $AA56;
  329.     {$ENDC}
  330. FUNCTION SRIdle: OSErr;
  331.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  332.     INLINE $303C, $0028, $AA56;
  333.     {$ENDC}
  334. { Language Model Building and Manipulation Functions }
  335. FUNCTION SRNewLanguageModel(system: SRRecognitionSystem; VAR model: SRLanguageModel; name: UNIV Ptr; nameLength: Size): OSErr;
  336.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  337.     INLINE $303C, $0812, $AA56;
  338.     {$ENDC}
  339. FUNCTION SRNewPath(system: SRRecognitionSystem; VAR path: SRPath): OSErr;
  340.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  341.     INLINE $303C, $0413, $AA56;
  342.     {$ENDC}
  343. FUNCTION SRNewPhrase(system: SRRecognitionSystem; VAR phrase: SRPhrase; text: UNIV Ptr; textLength: Size): OSErr;
  344.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  345.     INLINE $303C, $0814, $AA56;
  346.     {$ENDC}
  347. FUNCTION SRNewWord(system: SRRecognitionSystem; VAR word: SRWord; text: UNIV Ptr; textLength: Size): OSErr;
  348.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  349.     INLINE $303C, $0815, $AA56;
  350.     {$ENDC}
  351. { Operations on any object of the SRLanguageObject family }
  352. FUNCTION SRPutLanguageObjectIntoHandle(languageObject: SRLanguageObject; lobjHandle: Handle): OSErr;
  353.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  354.     INLINE $303C, $0416, $AA56;
  355.     {$ENDC}
  356. FUNCTION SRPutLanguageObjectIntoDataFile(languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  357.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  358.     INLINE $303C, $0328, $AA56;
  359.     {$ENDC}
  360. FUNCTION SRNewLanguageObjectFromHandle(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; lObjHandle: Handle): OSErr;
  361.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  362.     INLINE $303C, $0417, $AA56;
  363.     {$ENDC}
  364. FUNCTION SRNewLanguageObjectFromDataFile(system: SRRecognitionSystem; VAR languageObject: SRLanguageObject; fRefNum: INTEGER): OSErr;
  365.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  366.     INLINE $303C, $0427, $AA56;
  367.     {$ENDC}
  368. FUNCTION SREmptyLanguageObject(languageObject: SRLanguageObject): OSErr;
  369.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  370.     INLINE $303C, $0218, $AA56;
  371.     {$ENDC}
  372. FUNCTION SRChangeLanguageObject(languageObject: SRLanguageObject; text: UNIV Ptr; textLength: Size): OSErr;
  373.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  374.     INLINE $303C, $0619, $AA56;
  375.     {$ENDC}
  376. FUNCTION SRAddLanguageObject(base: SRLanguageObject; addon: SRLanguageObject): OSErr;
  377.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  378.     INLINE $303C, $041A, $AA56;
  379.     {$ENDC}
  380. FUNCTION SRAddText(base: SRLanguageObject; text: UNIV Ptr; textLength: Size; refCon: LONGINT): OSErr;
  381.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  382.     INLINE $303C, $081B, $AA56;
  383.     {$ENDC}
  384. FUNCTION SRRemoveLanguageObject(base: SRLanguageObject; toRemove: SRLanguageObject): OSErr;
  385.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  386.     INLINE $303C, $041C, $AA56;
  387.     {$ENDC}
  388. { Traversing SRRecognitionResults or SRLanguageObjects }
  389. FUNCTION SRCountItems(container: SRSpeechObject; VAR count: LONGINT): OSErr;
  390.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  391.     INLINE $303C, $0405, $AA56;
  392.     {$ENDC}
  393. FUNCTION SRGetIndexedItem(container: SRSpeechObject; VAR item: SRSpeechObject; index: LONGINT): OSErr;
  394.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  395.     INLINE $303C, $0606, $AA56;
  396.     {$ENDC}
  397. FUNCTION SRSetIndexedItem(container: SRSpeechObject; item: SRSpeechObject; index: LONGINT): OSErr;
  398.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  399.     INLINE $303C, $0607, $AA56;
  400.     {$ENDC}
  401. FUNCTION SRRemoveIndexedItem(container: SRSpeechObject; index: LONGINT): OSErr;
  402.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  403.     INLINE $303C, $0408, $AA56;
  404.     {$ENDC}
  405. { Utilizing the System Feedback Window }
  406. FUNCTION SRDrawText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  407.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  408.     INLINE $303C, $0621, $AA56;
  409.     {$ENDC}
  410. FUNCTION SRDrawRecognizedText(recognizer: SRRecognizer; dispText: UNIV Ptr; dispLength: Size): OSErr;
  411.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  412.     INLINE $303C, $0622, $AA56;
  413.     {$ENDC}
  414. FUNCTION SRSpeakText(recognizer: SRRecognizer; speakText: UNIV Ptr; speakLength: Size): OSErr;
  415.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  416.     INLINE $303C, $0620, $AA56;
  417.     {$ENDC}
  418. FUNCTION SRSpeakAndDrawText(recognizer: SRRecognizer; text: UNIV Ptr; textLength: Size): OSErr;
  419.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  420.     INLINE $303C, $061F, $AA56;
  421.     {$ENDC}
  422. FUNCTION SRStopSpeech(recognizer: SRRecognizer): OSErr;
  423.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  424.     INLINE $303C, $0223, $AA56;
  425.     {$ENDC}
  426. FUNCTION SRSpeechBusy(recognizer: SRRecognizer): BOOLEAN;
  427.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  428.     INLINE $303C, $0224, $AA56;
  429.     {$ENDC}
  430. FUNCTION SRProcessBegin(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  431.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  432.     INLINE $303C, $031D, $AA56;
  433.     {$ENDC}
  434. FUNCTION SRProcessEnd(recognizer: SRRecognizer; failed: BOOLEAN): OSErr;
  435.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  436.     INLINE $303C, $031E, $AA56;
  437.     {$ENDC}
  438.  
  439.  
  440. {$ALIGN RESET}
  441. {$POP}
  442.  
  443. {$SETC UsingIncludes := SpeechRecognitionIncludes}
  444.  
  445. {$ENDC} {__SPEECHRECOGNITION__}
  446.  
  447. {$IFC NOT UsingIncludes}
  448.  END.
  449. {$ENDC}
  450.